﻿using System;

namespace Model
{
	public class NumberAttribut : Attribut<double>
	{


		public NumberAttribut(string name, double wert)
			: base(name, wert)
		{
		}

		//public bool equals(Object obj)
		//{
		//	if (obj is Double)
		//	{
		//		double comp = (double)obj;
		//		return Value == comp;
		//	}

		//	return false;
		//}

		public static bool operator <(NumberAttribut thisAttr, double comp)
		{
			return thisAttr.Value < comp;
		}

		public static bool operator >(NumberAttribut thisAttr, double comp)
		{
			return thisAttr.Value > comp;
		}

		public static bool operator ==(NumberAttribut thisAttr, double comp)
		{
			return thisAttr.Value == comp;
		}

		public static bool operator !=(NumberAttribut thisAttr, double comp)
		{
			return thisAttr.Value != comp;
		}

		//public bool bigger(double comp)
		//{
		//	return Value > comp;
		//}

		//public bool smaller(double comp)
		//{
		//	return Value < comp;
		//}

		public override string ToString()
		{
			string returnString = "NumberAttribut: Name=" + base.Name + ", Wert=" + Value;
			return returnString;
		}

		public override Attribut Copy()
		{
			return new NumberAttribut(name, value);
		}
	}
}
